﻿

using HBase;
using MongoDB.Bson;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace hCommand {
    public class MongoLogTask :ZtTask {

        IMServer mServer = GuidangFactray.getDal<IMServer>();

        long emplyTime = DateTime.Now.Ticks;
        protected override bool init() {
            time = 2000;
            return true;
        }

        public override bool isStandAlone() {
            return true;
        }
        public override bool excute() {
            String time = DateTime.Now.ToString("yyyyMM");
            Dictionary<string ,List<object>> dict = GuidangCache.getAllMongoData();
            foreach( var t in dict ) {
                mServer.InsertBatch("",t.Key+ time,t.Value);
            }

       
            return true;
        }



    }
}
